﻿using System.Runtime.Serialization;
using System.ServiceModel;

namespace Atha.Services.Host
{
	[ServiceContract]
	public interface IAthaTestService
	{
		[OperationContract]
		TestScriptContract[] OpenTests();

		[OperationContract]
		TestScriptContract OpenTest(string path);

		[OperationContract]
		TestResult[] Execute(ExecuteTestScriptRequest testScript);

		[OperationContract]
		void SaveTest(TestScriptContract testScript);
	}

	[DataContract]
	public class ExecuteTestScriptRequest
	{
		[DataMember]
		public string TestLanguage { get; set; }

		[DataMember]
		public string TestScript { get; set; }
	}

	[DataContract]
	public class TestScriptContract
	{
		[DataMember]
		public string Name { get; set; }

		[DataMember]
		public string Language { get; set; }

		[DataMember]
		public string Content { get; set; }
	}
}
